﻿using System;
using System.Collections;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue queue = new Queue();

            queue.Enqueue("中华名族崛起!");

            queue.Enqueue(3000);

            queue.Enqueue("Drogan");

            int[] number = new int[2] { 1000, 80 };

            queue.Enqueue("niu");

            //1)遍历的方法
            while (queue.Count != 0)
            {
                var item = queue.Dequeue();
                Console.WriteLine(item);
            }
            //2)遍历的方法
            var result = queue.ToArray();
            foreach(var item in result)
            {
                Console.WriteLine(item);
            }
            //3)遍历的方法
            var newResult = queue.GetEnumerator();
            while (newResult.MoveNext())
            {
                Console.WriteLine(newResult.Current);
            }
        }
    }
}
